<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      /* 添加 box-sizing 以便更好地控制尺寸 */
    }

    li {
      list-style: none;
    }

    a {
      text-decoration: none;
    }


    .box {
      width: 1290px;
      background-color: #f4f5f7;
      margin: auto;
      padding: 30px;
      border-radius: 100px 0 100px 0;
    }

    .head {
      display: flex;
      justify-content: space-between;
      margin-bottom: 20px;
    }

    a {
      color: gray;
    }

    ul {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
    }

    li {
      background-color: white;
      width: 230px;
      height: 270px;
      transition: all 0.3s;
    }

    li:hover {
      transform: translateY(-10px);
      cursor: pointer;
    }

    .li-bottom {
      padding: 20px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 100px;
    }

    img {
      width: 100%;
    }

    .info {
      color: gray;
      font-size: 12px;
    }

    .info span {
      color: orange;
    }
  </style>
</head>

<body>
  <div class="box">

    <div class="head">
      <h3>精品推荐</h3>
      <a href="#">查看全部</a>
    </div>

    <div class="content">
      <ul>
        <script>

          let data = [
            {
              src: '../../../images/第五单元《对象》综合案例/course01.png',
              title: 'Think PHP 5.0 博客系统实战项目演练',
              num: 1125
            },
            {
              src: '../../../images/第五单元《对象》综合案例/course02.png',
              title: 'Android 网络动态图片加载实战',
              num: 357
            },
            {
              src: '../../../images/第五单元《对象》综合案例/course03.png',
              title: 'Angular2大前端商城实战项目演练',
              num: 22250
            },
            {
              src: '../../../images/第五单元《对象》综合案例/course04.png',
              title: 'AndroidAPP实战项目演练',
              num: 389
            },
            {
              src: '../../../images/第五单元《对象》综合案例/course05.png',
              title: 'UGUI源码深度分析案例',
              num: 124
            },
            {
              src: '../../../images/第五单元《对象》综合案例/course06.png',
              title: 'Kami2首页界面切换效果实战演练',
              num: 432
            },
            {
              src: '../../../images/第五单元《对象》综合案例/course07.png',
              title: 'UNITY 从入门到精通实战案例',
              num: 888
            },
            {
              src: '../../../images/第五单元《对象》综合案例/course08.png',
              title: 'Cocos 深度学习你不会错过的实战',
              num: 590
            },
            {
              src: '../../../images/第五单元《对象》综合案例/course04.png',
              title: '自动添加的模块',
              num: 1000
            }
          ]

          for (let i = 0; i < data.length; i++) {
            document.write(`
           <li>
          <img src=${data[i].src} alt="">
          <div class="li-bottom">
            <h5>${data[i].title}</h5>
            <div class="info">
              <span>高级</span>·<span>${data[i].num}</span>人在学习
            </div>
          </div>
        </li>
            `)
          }

        </script>


      </ul>
    </div>

  </div>
</body>

</html>